package user;

import jakarta.servlet.ServletException;
import jakarta.servlet.annotation.WebServlet;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;

import java.io.IOException;
@WebServlet(value = "/userManagement")
public class userManagementServlet extends HttpServlet {
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String action=request.getParameter("action");
        switch (action) {
            case "adduser":
                request.getRequestDispatcher("/WEB-INF/user/adduser.jsp").forward(request,response);
                break;
            case "findUser":
                request.getRequestDispatcher("/WEB-INF/user/findUser.jsp").forward(request,response);
                break;
            case "deleteUser":
                request.getRequestDispatcher("/WEB-INF/user/deleteUser.jsp").forward(request,response);
                break;
        }
    }
}
